home *** CD-ROM | disk | FTP | other *** search
/ Alles Voor Internet / Tout Pour Internet / alles voor internet.iso / MacInternet™ / Telnet / NCSA / tn3270 2.3d26 source / tn3270 / ala.kbmap < prev    next >
Text File  |  1991-01-21  |  14KB  |  507 lines

  1. #
  2. #  tn3270 for the Macintosh Source Code
  3. #  Brown University Computing and Information Services
  4. #  Version 2.3d21, January 17, 1991
  5. #  Copyright (c) 1988, 1989, 1990, 1991 by Brown University and by
  6. #  Peter John DiCamillo.
  7. #
  8. #  Permission is granted to any individual or institution to use, copy,
  9. #  or redistribute the binary version of this software and its
  10. #  documentation provided this notice and the copyright notices are
  11. #  retained.  Permission is granted to any individual or non-profit
  12. #  institution to use, copy, modify, or redistribute the source files
  13. #  of this software provided this notice and the copyright notices are
  14. #  retained.  This software may not be distributed for profit, either
  15. #  in original form or in derivative works, nor can the source be
  16. #  distributed to other than an individual or a non-profit institution.
  17. #  Any  individual or group interested in seeing and/or using these
  18. #  source files but who are prevented from doing so by the above
  19. #  constraints should contact Don Wolfe, Assistant Vice-President for
  20. #  Computer Systems at Brown University, (401) 863-7250, for possible
  21. #  software licensing of the source developed at Brown.
  22. #
  23. #  Brown University and Peter John DiCamillo make no representations
  24. #  about the suitability of this software for any purpose.
  25. #
  26. #  BROWN UNIVERSITY AND PETER JOHN DICAMILLO GIVE NO WARRANTY, EITHER
  27. #  EXPRESS OR IMPLIED, FOR THE PROGRAM AND/OR DOCUMENTATION PROVIDED,
  28. #  INCLUDING, WITHOUT LIMITATION, WARRANTY OF MERCHANTABILITY AND
  29. #  WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE.
  30. #
  31.  
  32. #
  33. # tn3270 keycode mapping definition
  34. #
  35. # General syntax rules:
  36. #    Case is ignored except in the name of the key mapping, and in character
  37. #    literals, e.g. 'a'.
  38. #
  39. #    Blank lines, white space, and any text following "#" on a line is ignored.
  40. #
  41. # The three types of definition lines are the mapping name definition, the
  42. # mapping number definition, and the key mapping definition:
  43. #
  44. #    To name this mapping:
  45. #        name: {mapping name}
  46. #    Underscores in the name are replaced by blanks.  Use two consecutive
  47. #    underscores to include an underscore in the name.
  48. #
  49. #    To assign a resource number for this mapping:
  50. #        number: {resource number}
  51. #    This number is only used when the resource is written out in "Rez"
  52. #    file format.
  53. #
  54. #    To map a function to a key sequence:
  55. #         function = [modifier] {'literal' | "hexcode" | "Khexcode"}
  56. #
  57. #    Function names are listed below.  Following each name enclosed in
  58. #    parenthesis is the EBCDIC hex code the name maps to.
  59. #      Punctuation Marks:
  60. #        space (40)        cent (4A)        period (4B)            less (4C)
  61. #        lparen (4D)        plus (4E)        or (4F)                ampersand (50)
  62. #        exclaim (5A)    dollar (5B)        asterisk (5C)        rparen (5D)
  63. #        semi (5E)        not (5F)        minus (60)            slash (61)
  64. #        vertical (6A)    comma (6B)        percent (6C)        underscore (6D)
  65. #        greater (6E)    question (6F)    accent (79)            colon (7A)
  66. #        pound (7B)        at (7C)            apostrophe (7D)        equal (7E)
  67. #        dblquote (7F)    tilde (A1)        lbrack (AD)            rbrack (BD)
  68. #        lbrace (C0)        rbrace (D0)
  69. #      Lowercase Letters:
  70. #        lca through lci (81 through 89)
  71. #        lcj through lcr (91 through 99)
  72. #        lcs through lcz (A2 through A9)
  73. #      Uppercase Letters:
  74. #        a through i    (C1 through C9)
  75. #        j through r (D1 through D9)
  76. #        s through z (E2 through E9)
  77. #      Digits:
  78. #        0 through 9 (F0 through F9)
  79. #      APL Characters: (hex codes given are preceded by Graphics Escape)
  80. #        Note: APL mode must be in effect for these characters to be generated.
  81. #        a_ through i_ (41 through 49) (underscored uppercase letters)
  82. #        j_ through r_ (51 through 59)
  83. #        s_ through z_ (62 through 69)
  84. #        i-beam (DA)            del-tilde (FB)        grade-down (DC)
  85. #        grade-up (DD)        vert-rotate (CD)    transpose (CF)
  86. #        hor-rotate (ED)        logarithm (FD)        nor (CB)
  87. #        nand (CA)            apl-exclaim (DB)    domino (EE)
  88. #        quote-quad (DE)        delta_ (FC)            format (FE)
  89. #        execute (EF)        lamp (DF)            expand (EB)
  90. #        compress (EA)
  91. #      ALA Characters (for use the built-in ALA font)
  92. #        left_tack (2A)        pointer (38)        paragraph (39)
  93. #        single_dagger (3A)    double_dagger(3B)    polish_l (41)
  94. #        slash_o (42)        d_crossed (43)        thorn (44)
  95. #        ae (45)                oe (46)                hook_o (47)
  96. #        hook_u (48)            maigkiy_znak (49)    lcpolish_l (51)
  97. #        lcslash_o (52)        lcd_crossed (53)    lcthorn (54)
  98. #        lcae (55)            lcoe (56)            lchook_o (57)
  99. #        lchook_u (58)        tverdyi_znak (59)    ayn (62)
  100. #        alf (63)            middle_dot (64)        turkish_i (65)
  101. #        flat (66)            patent (67)            eth (68)
  102. #        plus_or_minus (69)    sub0 (70) through sub8 (78)
  103. #        script_l (80)        angstrom (8A)        superior_dot (8B)
  104. #        umlaut (8C)            candrabindu (8D)    left_ligature (8E)
  105. #        left_d_tilde (8F)    sub9 (90)            grave (9A)
  106. #        acute (9B)            ala_circumflex (9C)    hacek (9D)
  107. #        right_ligature (9E)    right_d_tilde (9F)    ala_dagger(A0)
  108. #        sub_plus (AA)        sub_lparen (AB)        pincushion (AC)
  109. #        sub_minus (AE)        sub_rparen (AF)
  110. #        sup0 (B0) through sup9 (B9)                sup_plus (BA)
  111. #        sup_lparen (BB)        asper (BC)            sup_minus (BE)
  112. #        sup_rparen (BF)        circle_below (CA)    dot_below (CB)
  113. #        double_dot_below (CC)  breve (CD)        ala_tilde (CE)
  114. #        pseudo_quest (CF)    cedilla (DA)        high_comma_ctr (DB)
  115. #        right_hook (DC)        upadhmaniya (DD)    macron (DE)
  116. #        double_acute (DF)    british_pound (E2)    right_cedilla (EA)
  117. #        high_comma (EB)        left_hook (EC)        ala_underscore (ED)
  118. #        double_underscore (EE)  ala_alpha (FA)    ala_beta (FB)
  119. #        ala_gamma (FC)        yen (FD)            peso (FE)
  120. #      Attention Keys: (hex codes are the AID codes transmitted)
  121. #        pf1 through pf9 (F1 through F9)
  122. #        pf10 through pf12 (7A through 7C)
  123. #        pf13 through pf21 (C1 through C9)
  124. #        pf22 through pf24 (4A through 4C)
  125. #        enter (7D)        pa1 (6C)        pa2 (6E)        pa3 (6B)
  126. #        clear (6D)        treq (F0)        cursel (7E)
  127. #      Cursor Movement:
  128. #        up                down            left        right        tab
  129. #        backtab            newline            home        up*2        down*2
  130. #        left*2            right*2
  131. #      Editing:
  132. #        erase-eof        erase-input        delete-char        insert-char
  133. #        dup                field-mark        rub-out
  134. #      Program Control:
  135. #        insert-mode (toggle insert mode)
  136. #        apl-mode (toggle keyboard APL mode)
  137. #        cursor-pos (toggle cursor position display)
  138. #        reset (unlock keyboard)
  139. #        prog-reset (reset program; resets above modes and I/O)
  140. #
  141. #    Modifier is: normal, shift, command, command-shift, or option.  
  142. #   If the user presses more than one modifier key, the precedence of the
  143. #    modifiers is: command-shift, command, option, and shift.  It is not
  144. #    possible to specify mapping for other combinations, such as command-option.
  145. #    For ASCII key mappings, when "modifier" is omitted, the mapping applies
  146. #    to both "normal" and "shift".  For keycode mappings, the default modifier
  147. #    is "normal", i.e. no modifiers.
  148. #
  149. #    'literal' specifies a mapping to the ASCII code defined by the character
  150. #    literal.
  151. #
  152. #    "hexcode" specifies a mapping to the ASCII code given in hex.  It must
  153. #    consist of exactly two hex digits.
  154. #
  155. #    "Khexcode" specifies a keycode mapping to the code given in hex.  It must
  156. #    consist of exactly two hex digits.
  157. #    If a keycode mapping is defined for a key, it takes precedence over an
  158. #    ASCII code mapping for it.
  159. #    Keycode mapping use the raw key codes provided by the Macintosh operating
  160. #    system for a key press event.  They are hardware dependent, and should only
  161. #    be used when keys which must be distinguished return the same ASCII codes.
  162. #    For keycode values see "The Toolbox Event Manager" chapter in volumes 1 and
  163. #    5 of "Inside Macintosh".
  164. #
  165. # tn3270 default mapping:
  166. #
  167. name: ala
  168. number: 130
  169.  
  170. # charcter mappings
  171.  
  172. space = "20"        # spaces are ignored in literals too
  173. cent = option "d2"    # option [
  174. period = '.'
  175. less = '<'
  176. lparen = '('
  177. plus = '+'
  178. or = '|'
  179. ampersand = '&'
  180. exclaim = '!'
  181. dollar = '$'
  182. asterisk = '*'
  183. rparen = ')'
  184. semi = ';'
  185. not = '^'
  186. minus = '-'
  187. slash = '/'
  188. vertical = option '`'
  189. comma = ','
  190. percent = '%'
  191. underscore = '_'
  192. greater = '>'
  193. question = '?'
  194. accent = '`'
  195. colon = ':'
  196. pound = "23"    # can't use comment delimiter in a literal!
  197. at = '@'
  198. apostrophe = '''
  199. equal = '='
  200. dblquote = '"'
  201. lca = 'a'
  202. lcb = 'b'
  203. lcc = 'c'
  204. lcd = 'd'
  205. lce = 'e'
  206. lcf = 'f'
  207. lcg = 'g'
  208. lch = 'h'
  209. lci = 'i'
  210. lcj = 'j'
  211. lck = 'k'
  212. lcl = 'l'
  213. lcm = 'm'
  214. lcn = 'n'
  215. lco = 'o'
  216. lcp = 'p'
  217. lcq = 'q'
  218. lcr = 'r'
  219. lcs = 's'
  220. lct = 't'
  221. lcu = 'u'
  222. lcv = 'v'
  223. lcw = 'w'
  224. lcx = 'x'
  225. lcy = 'y'
  226. lcz = 'z'
  227. tilde = '~'
  228. lbrack = '['
  229. rbrack = ']'
  230. lbrace = '{'
  231. rbrace = '}'
  232. a = 'A'
  233. b = 'B'
  234. c = 'C'
  235. d = 'D'
  236. e = 'E'
  237. f = 'F'
  238. g = 'G'
  239. h = 'H'
  240. i = 'I'
  241. j = 'J'
  242. k = 'K'
  243. l = 'L'
  244. m = 'M'
  245. n = 'N'
  246. o = 'O'
  247. p = 'P'
  248. q = 'Q'
  249. r = 'R'
  250. s = 'S'
  251. t = 'T'
  252. u = 'U'
  253. v = 'V'
  254. w = 'W'
  255. x = 'X'
  256. y = 'Y'
  257. z = 'Z'
  258. backslash = '\'
  259. 0 = '0'
  260. 1 = '1'
  261. 2 = '2'
  262. 3 = '3'
  263. 4 = '4'
  264. 5 = '5'
  265. 6 = '6'
  266. 7 = '7'
  267. 8 = '8'
  268. 9 = '9'
  269. sub1 = command '1'
  270. sub2 = command '2'
  271. sub3 = command '3'
  272. sub4 = command '4'
  273. sub5 = command '5'
  274. sub6 = command '6'
  275. sub7 = command '7'
  276. sub8 = command '8'
  277. sub9 = command '9'
  278. sub0 = command '0'
  279. sub_minus = command '-'
  280. sub_plus = command '='
  281. sup1 = option "K12"
  282. sup1 = command-shift '1'
  283. sup2 = option "K13"
  284. sup2 = command-shift '2'
  285. sup3 = option "K14"
  286. sup3 = command-shift '3'
  287. sup4 = option "K15"
  288. sup4 = command-shift '4'
  289. sup5 = option "K17"
  290. sup5 = command-shift '5'
  291. sup6 = option "K16"
  292. sup6 = command-shift '6'
  293. sup7 = option "K1a"
  294. sup7 = command-shift '7'
  295. sup8 = option "K1c"
  296. sup8 = command-shift '8'
  297. sup9 = option "K19"
  298. sup9 = command-shift '9'
  299. sup0 = option "K1d"
  300. sup0 = command-shift '0'
  301. sup_minus = option "K1b"
  302. sup_minus = command-shift '-'
  303. sup_plus = option "K18"
  304. sup_plus = command-shift '='
  305. ae = command-shift 'q'
  306. d_crossed = command-shift 'w'
  307. polish_l = command-shift 'e'
  308. oe = command-shift 'r'
  309. hook_o = command-shift 't'
  310. slash_o = command-shift 'y'
  311. thorn = command-shift 'u'
  312. hook_u = command-shift 'i'
  313. sup_lparen = command-shift '['
  314. sup_rparen = command-shift ']'
  315. lcae = command 'q'
  316. lcd_crossed = command 'w'
  317. lcpolish_l = command 'e'
  318. lcoe = command 'r'
  319. lchook_o = command 't'
  320. lcslash_o = command 'y'
  321. lcthorn = command 'u'
  322. lchook_u = command 'i'
  323. sub_lparen = command '['
  324. sub_rparen = command ']'
  325. plus_or_minus = command '\'
  326. ala_alpha = command 'a'
  327. turkish_i = command 's'
  328. ayn = command 'd'
  329. alf = command 'f'
  330. miagkiy_znak = command 'g'
  331. tverdyi_znak = command-shift 'g'
  332. script_l = command 'z'
  333. british_pound = command-shift 'z'
  334. flat = command 'x'
  335. patent = command-shift 'x'
  336. ala_gamma = command 'c'
  337. eth = command 'v'
  338. ala_dagger = command-shift 'v'
  339. ala_beta = command 'b'
  340. middle_dot = command-shift 'b'
  341. upadhmaniya = normal "1b"                # keypad clear
  342. candrabindu = shift "1b"                # keypad clear
  343. ala_underscore =  normal "K51"            # keypad = (ADB keypad)
  344. double_underscore = shift "K51"            # keypad = (ADB keypad)
  345. ala_underscore = shift "K48"            # keypad , (numeric/Plus keypad)
  346. double_underscore = command-shift "K48"    # keypad , (numeric/Plus keypad)
  347. double_dot_below = "K4b"                # keypad / (ADB keypad)
  348. double_dot_below = shift "K4d"            # keypad / (numeric/Plus keypad)
  349. left_d_tilde = normal "K43"                # keypad * (ADB keypad)
  350. left_d_tilde = shift "K42"                # keypad * (numeric/Plus keypad)
  351. right_d_tilde = shift "K43"                # keypad * (ADB keypad)
  352. right_d_tilde = command-shift "K42"        # keypad * (numeric/Plus keypad)
  353. umlaut = normal "K59"                    # keypad 7
  354. acute = normal "K5b"                    # keypad 8
  355. double_acute = shift "K5b"                # keypad 8
  356. macron = normal "K5c"                    # keypad 9
  357. breve = shift "K5c"                        # keypad 9
  358. left_hook = normal "K4e"                # keypad -
  359. right_hook = shift "K4e"                # keypad -
  360. ala_circumflex = normal "K56"            # keypad 4
  361. hacek = shift "K56"                        # keypad 4
  362. ala_tilde = normal "K57"                # keypad 5
  363. cedilla = normal "K58"                    # keypad 6
  364. right_cedilla = shift "K58"                # keypad 6
  365. high_comma_ctr = normal "K45"            # keypad + (ADB keypad)
  366. high_comma_ctr = shift "K46"            # keypad + (numeric/Plus keypad)
  367. high_comma = shift "K45"                # keypad + (ADB keypad)
  368. high_comma = command-shift "K46"        # keypad + (numeric/Plus keypad)
  369. dot_below= normal "K53"                    # keypad 1
  370. superior_dot = shift "K53"                # keypad 1
  371. grave = normal "K54"                    # keypad 2
  372. circle_below = normal "K55"                # keypad 3
  373. angstrom = shift "K55"                    # keypad 3
  374. left_ligature = normal "K4c"            # keypad enter
  375. right_ligature = shift "K4c"            # keypad enter
  376. pseudo_quest = normal "K41"                # keypad .
  377.  
  378. enter = normal "0d"
  379.  
  380. pf1 = command "K53"            # keypad 1
  381. pf1 = "K7a"                    # F1
  382.  
  383. pf2 = command "K54"            # keypad 2    
  384. pf2 = "K78"                    # F2
  385.  
  386. pf3 = command "K55"            # keypad 3
  387. pf3 = "K63"                    # F3
  388.  
  389. pf4 = command "K56"            # keypad 4
  390. pf4 = "K76"                    # F4
  391.  
  392. pf5 = command "K57"            # keypad 5
  393. pf5 = "K60"                    # F5
  394.  
  395. pf6 = command "K58"            # keypad 6
  396. pf6 = "K61"                    # F6
  397.  
  398. pf7 = command "K59"            # keypad 7
  399. pf7 = "K62"                    # F7
  400. pf7 = "K74"                    # page up
  401.  
  402. pf8 = command "K5b"            # keypad 8
  403. pf8 = "K64"                    # F8
  404. pf8 = "K79"                    # page down
  405.  
  406. pf9 = command "K5c"            # keypad 9
  407. pf9 = "K65"                    # F9
  408.  
  409. pf10 = command "K52"        # keypad 0
  410. pf10 = "K6d"                # F10
  411.  
  412. pf11 = command "K41"        # keypad .
  413. pf11 = "K67"                # F11
  414.  
  415. pf12 = command "K4c"        # keypad enter
  416. pf12 = "K6f"                # F12
  417.  
  418. pf13 = command-shift "K53"    # keypad 1
  419. pf13 = "K69"                # F13
  420. pf13 = shift "K7a"            # F1
  421.  
  422. pf14 = command-shift "K54"    # keypad 2    
  423. pf14 = "K6b"                # F14
  424. pf14 = shift "K78"            # F2
  425.  
  426. pf15 = command-shift "K55"    # keypad 3
  427. pf15 = "K71"                # F15
  428. pf15 = shift "K63"            # F3
  429.  
  430. pf16 = command-shift "K56"    # keypad 4
  431. pf16 = shift "K76"            # F4
  432.  
  433. pf17 = command-shift "K57"    # keypad 5
  434. pf17 = shift "K60"            # F5
  435.  
  436. pf18 = command-shift "K58"    # keypad 6
  437. pf18 = shift "K61"            # F6
  438.  
  439. pf19 = command-shift "K59"    # keypad 7
  440. pf19 = shift "K62"            # F7
  441.  
  442. pf20 = command-shift "K5b"    # keypad 8
  443. pf20 = shift "K64"            # F8
  444.  
  445. pf21 = command-shift "K5c"    # keypad 9
  446. pf21 = shift "K65"            # F9
  447.  
  448. pf22 = command-shift "K52"    # keypad 0
  449. pf22 = shift "K6d"            # F10
  450.  
  451. pf23 = command-shift "K41"    # keypad .
  452. pf23 = shift "K67"            # F11
  453.  
  454. pf24 = command-shift "K4c"    # keypad enter
  455. pf24 = shift "K6f"            # F12
  456.  
  457. pa1 = command ','
  458.  
  459. pa2 = command '.'
  460.  
  461. pa3 = command "03"    # enter
  462.  
  463. treq = command '/'
  464.  
  465. cursel = command 'l'
  466.  
  467. up = "1e"                    # up arrow code
  468.  
  469. down = "1f"                    # down arrow code
  470.  
  471. left = "1c"                    # left arrow code
  472. left = normal "08"            # backspace/delete code
  473.  
  474. right = "1d"                # right arrow code
  475.  
  476. tab = normal "09"            # tab key
  477. backtab = shift "09"
  478.  
  479. newline = "03"                # enter key
  480. newline = shift "0d"        # return key
  481.  
  482. home = command "0d"            # return key
  483.  
  484. delete-char = shift "08"    # backspace/delete key
  485. delete-char = "K75"            # X (Del) key
  486.  
  487. dup = option "K02"            # dup
  488.  
  489. field-mark = option "K03"    # field-mark
  490.  
  491. insert-char = option "08"    # backspace/delete key
  492.  
  493. rub-out = command "08"        # backspace/delete key
  494.  
  495. up*2 = option "1e"            # up arrow code
  496.  
  497. down*2 = option "1f"        # down arrow code
  498.  
  499. left*2 = option "1c"        # left arrow code
  500.  
  501. right*2 = option "1d"        # right arrow code
  502.  
  503. insert-mode = "K72"            # ins/help
  504. erase-eof = "K77"            # end
  505. clear = "K73"                # home key
  506.  
  507.